package com.dandan.tzx.otherwork;

import android.app.Activity;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import com.alibaba.android.arouter.facade.annotation.Route;
import com.dandan.tzx.router.DDRouter;

/**
 * Created by tanzhenxing
 * Date: 2018/1/11 下午8:52
 * Description:
 */
@Route(path = RouterPathConfig.OMainActivity)
public class OMainActivity extends Activity{
    private TextView textView;
    private Button button;
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_defalut);
        textView = (TextView) findViewById(R.id.text_view);
        textView.setText("DEFAULT");
        button = (Button) findViewById(R.id.button);
        button.setText("WEBView");
        button.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                DDRouter.getInstance().build("/activity/WebViewActivity").navigation(OMainActivity.this);
            }
        });
    }
}
